package com.addplus.townmall.server.api.mapper.town;

import com.addplus.townmall.server.api.model.town.DistributionWithdraw;
import com.addplus.townmall.server.api.model.town.expand.DistributionWithdrawExpand;
import com.addplus.townmall.server.api.utils.BaseAddMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 分销会员提现表 Mapper 接口
 * </p>
 *
 * @author zhangjiehang
 * @since 2018-08-27
 */
public interface DistributionWithdrawMapper extends BaseAddMapper<DistributionWithdraw> {

    @Select("SELECT\n" +
            "\tm.nick_name,\n" +
            "\tdw.* \n" +
            "FROM\n" +
            "\tdistribution_withdraw dw\n" +
            "\tLEFT JOIN member m ON m.id = dw.member_id \n" +
            "WHERE\n" +
            "\tdw.is_delete = 0")
    List<DistributionWithdrawExpand> getWithdrawExpandByPage(Page page);
}
